Skip to content

Extend registry checks to the development registry#9233

Open
JeffreyCA wants to merge 3 commits into
Azure:mainfrom
JeffreyCA:jeffreyca/ext-registry-check-dev
Open

Extend registry checks to the development registry#9233
JeffreyCA wants to merge 3 commits into
Azure:mainfrom
JeffreyCA:jeffreyca/ext-registry-check-dev

Conversation

@JeffreyCA

@JeffreyCA JeffreyCA commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Closes #9234

This PR extends the existing extension registry approval policy to cli/azd/extensions/registry.dev.json, applying the same validation and CODEOWNERS rules currently used for the production registry.

Changes

  • Trigger ext-registry-check when either production or development registry changes, including rename scenarios.
  • Independently evaluate each changed registry through the existing metadata, release immutability, version progression, capability, provider, and artifact URL policies.
  • Allow registry-only PRs to update either or both registry files while continuing to require core review for unrelated file changes.
  • Assign registry.dev.json the same CODEOWNERS as registry.json.

Testing

  • npm test: 54 tests passed, with 5 opt-in live tests skipped.
  • RUN_LIVE_TESTS=1 npm test: all 59 tests passed, including the existing real GitHub PR scenarios.
  • End-to-end canary using a temporary workflow and draft PR JeffreyCA/azure-dev#53:
    • A cosmetic registry.dev.json display-name update passed.
    • A restricted namespace update failed as expected, reporting that core review was required for the registry.dev.json metadata change.
    • The canary PR was closed and all temporary branches were deleted after testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2fc23d6a-ef10-4f60-b369-2770f0af80d6
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
22 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@JeffreyCA
JeffreyCA marked this pull request as ready for review July 21, 2026 18:05
Copilot AI review requested due to automatic review settings July 21, 2026 18:05
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
22 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends extension registry approval checks and ownership rules to the development registry.

Changes:

  • Detects and validates changes to either registry, including renames.
  • Supports registry-only updates affecting one or both registries.
  • Adds equivalent CODEOWNERS coverage and tests.
Show a summary per file
File Description
.github/workflows/ext-registry-check.yml Detects changes to both registries.
.github/scripts/src/ext-registry-check.js Applies policy checks independently per registry.
.github/scripts/test/ext-registry-check.test.js Tests development and dual-registry updates.
.github/CODEOWNERS Assigns development registry owners.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Medium

@richardpark-msft richardpark-msft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small stuff - generally, I dislike default values as they usually just lead to weird bugs. There's no compat requirements for that function, so change the signature at will :)

Comment thread .github/scripts/src/ext-registry-check.js Outdated
Comment thread .github/scripts/src/ext-registry-check.js Outdated
Comment thread .github/scripts/src/ext-registry-check.js Outdated
@richardpark-msft
richardpark-msft self-requested a review July 21, 2026 18:27

@richardpark-msft richardpark-msft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, meant to use request changes earlier.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The per-registry loop and dual-path detection look correct, and the tests cover the dev-only and both-registries cases. One follow-on tied to the existing request to drop the registryPath defaults: see the inline note on DEFAULT_REGISTRY_JSON_PATH.

Comment thread .github/scripts/src/ext-registry-check.js Outdated
Remove implicit registry path and base ref defaults, and include the supported registry paths in validation errors.
Copilot AI review requested due to automatic review settings July 21, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Medium

Comment thread .github/scripts/src/ext-registry-check.js Outdated
Comment thread .github/scripts/test/ext-registry-check.test.js

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the removed defaults are safe: run() passes registryPath and registryBaseRef explicitly at every call site, and falls back to base sha then 'main' before invoking the check. My earlier note about the dangling DEFAULT_REGISTRY_JSON_PATH constant is resolved.

Copilot AI review requested due to automatic review settings July 21, 2026 21:18
@JeffreyCA

Copy link
Copy Markdown
Contributor Author

/check-enforcer evaluate

@richardpark-msft richardpark-msft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the feedback. Now...you just have copilot to deal with.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit resolves the two open threads on the last revision. diffChangedFiles now emits separate, correctly-directed messages for non-registry edits versus registry renames, and the added test drives per-path fixtures with one policy-invalid registry so independent per-registry evaluation is actually exercised. Re-approving on the current HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply extension registry checks to registry.dev.json

5 participants